package com.lieve;

import com.lieve.config.AppConfig;
import com.lieve.dao.UserDao;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author sunlijiang
 * @date 2020/4/23
 */
public class App {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext annotationConfigApplicationContext
                = new AnnotationConfigApplicationContext(AppConfig.class);
        UserDao userDao = (UserDao)annotationConfigApplicationContext.getBean("userDao");
        userDao.test();
        annotationConfigApplicationContext.close();
        System.out.println("");
    }
}
